import java.util.*;
class MyHashSet {
    static List<LinkedList> arr;
    static LinkedList<Integer> list;
    public MyHashSet() {
        arr = new ArrayList<>();
    }

    public void add(int key) {
        int dest = key % 128;
        if(arr.get(dest) == null){
            list = new LinkedList<>();
            list.add(key);
            arr.add(dest,list);
        }else{
            LinkedList<Integer> lot = arr.get(dest);
            for(int i = 0 ; i < list.size(); i++){
                if(lot.get(i) == key){
                    return;
                }
            }
            list.push(key);
        }
    }

    public void remove(int key) {
        int dest = key % 128;
        if(arr.get(dest) == null){
            return;
        }else{
            List lot = arr.get(dest);
            for(int i = 0 ; i < list.size(); i++){
                if(lot(i) == key){
                    lot.remove(i);
                }
            }
        }
    }

    public boolean contains(int key) {
        int dest = key % 128;
        if(arr.get(dest) == null){
            return false;
        }else{
            List lot = arr.get(dest);
            for(int i = 0 ; i < list.size(); i++){
                if(lot(i) == key){
                    return true;
                }
            }
            return false;
        }
    }
}
public class MyHashSet {

}
